{include file="base/header"}
        <div class="layui-card">
            <div class="layui-card-body">
                <form class="layui-form" action="">
                    <div class="layui-form-item">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">反馈单号</label>
                            <div class="layui-input-inline">
                                <input type="text" name="sn" placeholder="" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">用户信息</label>
                            <div class="layui-input-inline">
                                <input type="text" name="umsg" placeholder="" class="layui-input">
                            </div>
                        </div>
                        
               
                        <div class="layui-form-item layui-inline">
                            <button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="user-query">
                                <i class="layui-icon layui-icon-search"></i>
                                查询
                            </button>
                            <button type="reset" class="pear-btn pear-btn-md">
                                <i class="layui-icon layui-icon-refresh"></i>
                                重置
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        
        <div class="layui-card">
            <div class="layui-card-body">
                <div class="layui-tab layui-tab-card layui-tab-brief" lay-filter="tab-tx-href">
                    <ul class="layui-tab-title">
                        <li class="layui-this">全部</li>
                        <li>待处理</li>
                        <li>已处理</li>
                    </ul>
                    <div class="layui-tab-content">
                        <table style="margin-top: 10px;" id="tableId" lay-filter="user-table"></table>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/html" id="user-status">
            {{#if (d.status == '0') { }}
                <span class="layui-badge layui-bg-orange">待处理</span>
            {{# }else if(d.status == '1'){ }}
            <span class="layui-badge layui-bg-blue">已处理</span>
            {{# } }}
        </script>
  
        <script type="text/html" id="user-usermsg">
            <img src="{{d.umsg.head_img}}" class="layui-nav-img">
            <span>{{d.umsg.nickname}}
            </span>
            {{#if (d.umsg.mobile ) { }}
                <span>| {{d.umsg.mobile}}</span>
            {{# } }}
        </script>
        <script type="text/html" id="user-ausermsg">
            {{#if (d.status) { }}
                <img src="/static/efile/auserimg/{{d.shid_msg.img}}" class="layui-nav-img">
                <span>{{d.shid_msg.nickname}}</span>
                <span>| {{d.shid_msg.mobile}}</span>
            {{# }else{ }}
                -
            {{# } }}
        </script>
        <script type="text/html" id="user-shtime">
            {{#if (d.status) { }}
            <span>{{d.cltime}}</span>
            {{# }else{ }}
                -
            {{# } }}
        </script>

        <script type="text/html" id="user-set">
            {{#if (!d.status) { }}
            <button class="pear-btn pear-btn-primary pear-btn-xs" lay-event="shItem">处理</button>
            {{# }else{ }}
            暂无操作
            {{# } }}
        </script>

  
        <script>
            layui.use(['table','form','jquery','element'],function () {
                let table = layui.table;
                let form = layui.form;
                let element = layui.element;
                _tab_index=0;
              
        
                let cols = [
                    [
                        {title: '反馈单号', field: 'sn', align:'left'},
                        {title: '反馈用户', field: 'iuser_id', align:'left',templet: '#user-usermsg',width:200},
                        {title: '反馈内容', field: 'content', align:'left',width:200},
                        {title: '状态', field: 'status', align:'center',templet: '#user-status',width:100},
                        {title: '反馈时间', field: 'addtime',align:'left'},
                        {title: '处理时间', field: 'shtime', align:'left',templet: '#user-shtime'},
                        {title: '处理人', field: 'shid',templet:'#user-ausermsg', align:'left',width:250},
                        {title: '处理备注', field: 'clremark', align:'left'},
                        {title: '操作', templet:'#user-set', align:'left',  width:150}
                    ]
                ]

                table.render({
                        elem: '#tableId',
                        url: "{:url('basic/fklst')}?t="+_tab_index,
                        page: true ,
                        cols: cols ,
                        skin: 'line',
                        toolbar: false
                    });
                element.on("tab(tab-tx-href)",function(data){
                    _tab_index=data.index;
                    table.render({
                        elem: '#tableId',
                        url: "{:url('basic/fklst')}?t="+_tab_index,
                        page: true ,
                        cols: cols ,
                        skin: 'line',
                        toolbar: false
                    });
                })

                table.on('tool(user-table)', function (obj) {
                    if (obj.event === 'shItem') {
                        window.shItem(obj.data);
                    }
                });
                window.shItem=function(data){
                    layer.open({
                        type: 2,
                        title: '处理反馈单->'+ data.sn,
                        shade: 0.1,
                        area: ['500px', '500px'],
                        content: "{:url('basic/clfeeb')}?id="+data.id
                    });
                }

                form.on('submit(user-query)', function (data) {
                    table.reload('tableId', {
                        page: {curr: 1 },
                        where: data.field
                    })
                    return false;
                });

        
            })
        </script>
{include file="base/footer"}